How To Add A Menuitem In Right Click Popup

Hello:

I've been working on dxl development to add a menuitem in the popup menu when user right clicks a requirement object. I've look it up in dxl user mannual, but chapter "Module menus" is really confusing and I didn't got any idea about how to add a menuitem. Anybody has any clues about how to implement this function? Thanks a lot!

Best regards,
Cauly
Cauly - Sun Nov 13 21:16:18 EST 2011

Re: How To Add A Menuitem In Right Click Popup
Cauly - Sun Nov 13 21:28:52 EST 2011

Alright. I got it.

The right click thing is quite straight forward. Just put a dxl file in you lib/dxl/config/formalPopup directory, where you create a new item in the popup menu:

createItem(null, "New Item",'n','Ü', null,null,null,null, "C:\\TEST.DXL")

Re: How To Add A Menuitem In Right Click Popup
SystemAdmin - Mon Nov 14 17:37:24 EST 2011

Cauly - Sun Nov 13 21:28:52 EST 2011
Alright. I got it.

The right click thing is quite straight forward. Just put a dxl file in you lib/dxl/config/formalPopup directory, where you create a new item in the popup menu:

createItem(null, "New Item",'n','Ü', null,null,null,null, "C:\\TEST.DXL")

Can you specify what each of the arguments for the createItem function are? Thanks.
-Adam

Re: How To Add A Menuitem In Right Click Popup
llandale - Mon Nov 14 17:46:25 EST 2011

SystemAdmin - Mon Nov 14 17:37:24 EST 2011
Can you specify what each of the arguments for the createItem function are? Thanks.
-Adam

There are several flavors. I think I found them all:

void      createItem(int mappingFunction(),void dxlCallback(),string label,char mnemonic,
                        char accelerator,int modifierKeyFlags,IconID icon_id,string tooltip,
                        string helptext,string inactiveHelp)            
void    createItem(MA_StdItem__ standardItem,string label,char mnemonic,char accelerator,
                        IconID icon_id,string tooltip,string helptext,string inactiveHelp,string dxlFile)
void    createItem(int mappingFunction(),string label,char mnemonic,char accelerator,
                        int modifierKeyFlags,IconID icon_id,string tooltip,string helptext,
                        string inactiveHelp,string dxlFile)
 
void    createItem(int mappingFunction(),void dxlCallback(),string label,char mnemonic,
                        char accelerator,int modifierKeyFlags,string iconFilename,string tooltip,
                        string helptext,string inactiveHelp)                    
void    createItem(MA_StdItem__ standardItem,string label,char mnemonic,char accelerator,
                        string iconFilename,string tooltip,string helptext,string inactiveHelp,string dxlFile) 
 
void    createItem(int mappingFunction(),string label,char mnemonic,char accelerator,
                        int modifierKeyFlags,string iconFilename,string tooltip,string helptext,
                        string inactiveHelp,string dxlFile)

Re: How To Add A Menuitem In Right Click Popup
Cauly - Mon Nov 14 20:20:01 EST 2011

OK, I have another question.

Is it possible to determine what's within the popup menu after the right button is pressed?

This enables me to change the menuitem caption according to the current Object.

Thanks again!

Re: How To Add A Menuitem In Right Click Popup
Mathias Mamsch - Tue Nov 15 03:38:14 EST 2011

Cauly - Mon Nov 14 20:20:01 EST 2011
OK, I have another question.

Is it possible to determine what's within the popup menu after the right button is pressed?

This enables me to change the menuitem caption according to the current Object.

Thanks again!

Hmm ... I think the popup menu itself is outside of your control, i.e. you can specify what items to generate, but this will only be done once a module is opened and it seems you cannot change the text later. A more DOORS compliant way would maybe be to make the menu entry show a non-modal GUI that will show information and update it with a sync trigger. Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: How To Add A Menuitem In Right Click Popup
Cauly - Mon Nov 21 20:34:23 EST 2011

Thanks Mathias, I think I shall learn more about DOORS and dxl to accomplish this.